﻿using Ewelve_Mouth_HD.DAL;
using Ewelve_Mouth_HD.Model;

namespace Ewelve_Mouth_HD.BLL
{
    public class RoomBll
    {
        private readonly RoomDal roomDal;

        public RoomBll(RoomDal _roomDal)
        {
            roomDal = _roomDal;
        }
        /// <summary>
        /// 排房添加
        /// </summary>
        /// <param name="W"></param>
        /// <returns></returns>
        public int RoomAdd(Room W)
        {
            try
            {
                return roomDal.RoomAdd(W);
            }
            catch (Exception)
            {

                throw;
            }
        }
        /// <summary>
        /// 分页
        /// </summary>
        /// <param name="PageIndex"></param>
        /// <param name="PageSize"></param>
        /// <param name="PageSum"></param>
        /// <param name="PageCount"></param>
        /// <returns></returns>
        public IQueryable RoomShowAll(int PageIndex, int PageSize, out int PageSum, out int PageCount)
        {
            try
            {
                return roomDal.RoomShowAll(PageIndex, PageSize, out PageSum, out PageCount);
            }
            catch (Exception)
            {

                throw;
            }
        }
    }
}
